package cn.gson.fengboot.controller;

import cn.gson.fengboot.model.mapper.DmenusMapper;
import cn.gson.fengboot.model.pojos.QmenusEntity;
import cn.gson.fengboot.model.service.DmenusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/myjurisdiction")
public class DmenusController {

    @Autowired
    DmenusService service;

    /*查询我所有的权限菜单*/
    @RequestMapping("/myallmenus")
    public List<QmenusEntity> myallmenus(){
        return service.myallmenus();
    }


    /*查询我部门已有的权限菜单*/
    @RequestMapping("/mydepallmenus")
    public List<QmenusEntity> mydepallmenus(Integer depId){
        return service.mydepallmenus(depId);
    }

    /*给部门添加权限*/
    @RequestMapping("/savemydepmenus")
    public void savemydepmenus(String mydepandmenus){
        service.mydepandmenus(mydepandmenus);
    }

}
